﻿<UserControl x:Class="Pellared.SalaryBook.Views.SalaryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:properties="clr-namespace:Pellared.SalaryBook.Properties"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignData Source=/SampleData/EditableSalaryData.xaml}">
    <Grid Margin="25">
        <Grid.Resources>
            <Style TargetType="{x:Type TextBlock}">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="Foreground" Value="{StaticResource ButtonFontColor}"/>
                <Setter Property="FontWeight" Value="Bold"/>
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="150" />
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static properties:Resources.FirstNameText}"  />
        <TextBox Grid.Row="0" Grid.Column="1" Margin="5"
            IsReadOnly="True" Text="{Binding FirstName, Mode=OneWay}"/>

        <TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static properties:Resources.LastNameText}" />
        <TextBox Grid.Row="1" Grid.Column="1" Margin="5"
                 IsReadOnly="True" Text="{Binding LastName, Mode=OneWay}"/>

        <TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static properties:Resources.BirthDateText}" />
        <TextBox Grid.Row="2" Grid.Column="1" Margin="5"
                 IsReadOnly="True" Text="{Binding BirthDate, StringFormat=yyyy-MM-dd, Mode=OneWay}"/>

        <TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static properties:Resources.SalaryText}" />
        <TextBox Grid.Row="3" Grid.Column="1" Margin="5"
                 IsReadOnly="True" Text="{Binding SalaryValue, StringFormat=C2, Mode=OneWay}"/>
    </Grid>
</UserControl>
